/**
 * @Project Name:hoofungson-elk-log
 * @Package Name:cn.hoofungson.framework.elk.log.appender
 * @Since JDK 1.8
 */

package cn.hoofungson.framework.elk.log.appender;

import ch.qos.logback.core.rolling.RollingFileAppender;
import ch.qos.logback.core.rolling.RollingPolicy;
import ch.qos.logback.core.rolling.TriggeringPolicy;
import cn.hoofungson.framework.elk.log.domain.AppInfo;
import cn.hoofungson.framework.elk.log.util.AppInfoUtils;
import lombok.Getter;
import lombok.Setter;

/**
 * @Description: LogRollingFileAppender
 * @Author 胡松 hoofungson@163.com
 * @Date 2020-03-07 18:18
 * @Version V1.0
 */
@Getter
@Setter
public class LogRollingFileAppender extends RollingFileAppender {

    /**
     * 应用信息
     * **/
    private AppInfo appInfo;

    public LogRollingFileAppender() {
        super();
    }

    @Override
    public void start() {
        AppInfoUtils.setAppInfo(this.appInfo);
        super.start();
    }

    @Override
    public void setFile(String file) {
        super.setFile(file);
    }

    @Override
    protected void subAppend(Object event) {
        super.subAppend(event);
    }

    @Override
    public void setRollingPolicy(RollingPolicy policy) {
        super.setRollingPolicy(policy);
    }

    @Override
    public void setTriggeringPolicy(TriggeringPolicy policy) {
        super.setTriggeringPolicy(policy);
    }

    @Override
    public void stop() {
        super.stop();
    }
}
